import { defineStore } from 'pinia'


export const useStore = defineStore({
  id:'counter',
  state:() => ({
    token: JSON.parse(window.sessionStorage.getItem('token') || 'null'),
    userInfos: JSON.parse(window.sessionStorage.getItem('Infos') || 'null'),
    adminInfos: JSON.parse(window.sessionStorage.getItem('adminInfos') || '{}'),
  }),
  actions: {
  },
  getters:{},


  // 开启数据缓存
  // persist:{
  //   enabled:true,
  //   strategies:[{
  //     key:'****',
  //     storage:sessionStorage,
  //   }]
  // },
})
